package
{
	import flash.display.Bitmap;

	public class Resources
	{
		///////////////////////////////////////////////////////
		// Bitmaps
		protected static var BMP_COUNT:int = 0;
		public static const BMP_BG_01:int = BMP_COUNT++;
		public static const BMP_BG_02:int = BMP_COUNT++;
		public static const BMP_BG_03:int = BMP_COUNT++;
		public static const BMP_BG_04:int = BMP_COUNT++;
		public static const BMP_BG_05:int = BMP_COUNT++;
		public static const BMP_BG_06:int = BMP_COUNT++;
		public static const BMP_BG_07:int = BMP_COUNT++;
		public static const BMP_BG_08:int = BMP_COUNT++;
		public static const BMP_BG_09:int = BMP_COUNT++;
		public static const BMP_BG_10:int = BMP_COUNT++;
		public static const BMP_BG_11:int = BMP_COUNT++;
		public static const BMP_BG_12:int = BMP_COUNT++;
		public static const BMP_BG_13:int = BMP_COUNT++;
		public static const BMP_BG_14:int = BMP_COUNT++;
		public static const BMP_BG_15:int = BMP_COUNT++;
		public static const BMP_BG_16:int = BMP_COUNT++;
		public static const BMP_BG_17:int = BMP_COUNT++;
		public static const BMP_BG_18:int = BMP_COUNT++;
		public static const BMP_BG_19:int = BMP_COUNT++;
		public static const BMP_BG_20:int = BMP_COUNT++;
		public static const BMP_BG_21:int = BMP_COUNT++;
		public static const BMP_BG_22:int = BMP_COUNT++;
		public static const BMP_BG_23:int = BMP_COUNT++;
		
		protected static const strBG01:String = "assets/background/bg01.jpg";
		
		protected static var m_arrSources:Array = null;
		
		[Embed(source="assets/background/bg01.jpg")]
		protected static const clsBG01:Class;
		[Embed(source="assets/background/bg02.jpg")]
		protected static const clsBG02:Class;
		[Embed(source="assets/background/bg03.jpg")]
		protected static const clsBG03:Class;
		[Embed(source="assets/background/bg04.jpg")]
		protected static const clsBG04:Class;
		[Embed(source="assets/background/bg05.jpg")]
		protected static const clsBG05:Class;
		[Embed(source="assets/background/bg06.jpg")]
		protected static const clsBG06:Class;
		[Embed(source="assets/background/bg07.jpg")]
		protected static const clsBG07:Class;
		[Embed(source="assets/background/bg08.jpg")]
		protected static const clsBG08:Class;
		[Embed(source="assets/background/bg09.jpg")]
		protected static const clsBG09:Class;
		[Embed(source="assets/background/bg10.jpg")]
		protected static const clsBG10:Class;
		[Embed(source="assets/background/bg11.jpg")]
		protected static const clsBG11:Class;
		[Embed(source="assets/background/bg12.jpg")]
		protected static const clsBG12:Class;
		[Embed(source="assets/background/bg13.jpg")]
		protected static const clsBG13:Class;
		[Embed(source="assets/background/bg14.jpg")]
		protected static const clsBG14:Class;
		[Embed(source="assets/background/bg15.jpg")]
		protected static const clsBG15:Class;
		[Embed(source="assets/background/bg16.jpg")]
		protected static const clsBG16:Class;
		[Embed(source="assets/background/bg17.jpg")]
		protected static const clsBG17:Class;
		[Embed(source="assets/background/bg18.jpg")]
		protected static const clsBG18:Class;
		[Embed(source="assets/background/bg19.jpg")]
		protected static const clsBG19:Class;
		[Embed(source="assets/background/bg20.jpg")]
		protected static const clsBG20:Class;
		[Embed(source="assets/background/bg21.jpg")]
		protected static const clsBG21:Class;
		[Embed(source="assets/background/bg22.jpg")]
		protected static const clsBG22:Class;
		[Embed(source="assets/background/bg23.jpg")]
		protected static const clsBG23:Class;
		
		protected static var m_arrBitmaps:Array = null;
		///////////////////////////////////////////////////////
		
		///////////////////////////////////////////////////////
		// Scripts
		protected static var SCRIPT_COUNT:int = 0;
		public static const SCRIPT_STORY_01_01:int = SCRIPT_COUNT++;
		
		[Embed(source="assets/story/scripts/01_01.xml")]
		protected static const clsStory_01_01:Class;
		
		protected static var m_arrScripts:Array = null;
		///////////////////////////////////////////////////////
		
		public function Resources()
		{
		}
		
		protected static function InitializeSource():void
		{
			m_arrSources = new Array(BMP_COUNT);
			
			m_arrSources[BMP_BG_01] = strBG01;
		}
		
		protected static function InitializeBitmap():void
		{
			m_arrBitmaps = new Array(BMP_COUNT);
			
			m_arrBitmaps[BMP_BG_01] = clsBG01;
			m_arrBitmaps[BMP_BG_02] = clsBG02;
			m_arrBitmaps[BMP_BG_03] = clsBG03;
			m_arrBitmaps[BMP_BG_04] = clsBG04;
			m_arrBitmaps[BMP_BG_05] = clsBG05;
			m_arrBitmaps[BMP_BG_06] = clsBG06;
			m_arrBitmaps[BMP_BG_07] = clsBG07;
			m_arrBitmaps[BMP_BG_08] = clsBG08;
			m_arrBitmaps[BMP_BG_09] = clsBG09;
			m_arrBitmaps[BMP_BG_10] = clsBG10;
			m_arrBitmaps[BMP_BG_11] = clsBG11;
			m_arrBitmaps[BMP_BG_12] = clsBG12;
			m_arrBitmaps[BMP_BG_13] = clsBG13;
			m_arrBitmaps[BMP_BG_14] = clsBG14;
			m_arrBitmaps[BMP_BG_15] = clsBG15;
			m_arrBitmaps[BMP_BG_16] = clsBG16;
			m_arrBitmaps[BMP_BG_17] = clsBG17;
			m_arrBitmaps[BMP_BG_18] = clsBG18;
			m_arrBitmaps[BMP_BG_19] = clsBG19;
			m_arrBitmaps[BMP_BG_20] = clsBG20;
		}
		
		public static function GetSource( index:int ):String
		{
			if( m_arrSources == null )
			{
				InitializeSource();
			}
			
			if( index < 0 || index > m_arrSources.length )
				return null;
			
			return m_arrSources[index];
		}
		
		public static function GetBitmap( index:int ):Class
		{
			if( m_arrBitmaps == null )
			{
				InitializeBitmap();
			}
			
			if( index < 0 || index > m_arrBitmaps.length )
				return null;
			
			return m_arrBitmaps[index];
		}
		
		protected static function InitializeScript():void
		{
			m_arrScripts = new Array(SCRIPT_COUNT);
			
			m_arrScripts[SCRIPT_STORY_01_01] = clsStory_01_01.data;
		}
		
		public static function GetScript( index:int ):XML
		{
			if( m_arrScripts == null )
			{
				InitializeScript();
			}
			
			if( index < 0 || index > m_arrScripts.length )
				return null;

			return m_arrScripts[index];
		}
	}
}